<?php
      require ("config/siteconfig.php");
      require ("members/database.php");
      ?>
  <?php
  if ( $siteconfigcolor = "Blue") $sitecss = "../css/styleblue.css"; if ( $siteconfigcolor = "Orange") $sitecss = "../css/style.css"; if ( $siteconfigcolor = "Pink") $sitecss = "../css/stylepink.css"; ?>
  <html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <?php print ( "<link rel=\"stylesheet\" href=$sitecss type=\"text/css\" media=\"screen\">" ); ?>
    <?php
            include_once 'geshi/geshi.php';
            if ( !isset ( $_REQUEST['id'] ) ) die ( "ID not specified!" );
            database_connect ();
            $array = database_retrieve ( $_REQUEST['id'] );

            $text = htmlentities ( $array ['Text'] );

            $source = $text;
            $language = $array['Language'];
            $geshi = new GeSHi($source, $language);
        ?>
    <script type="text/javascript" src="../js/accordian.pack.js"></script>
    <title><?php $sitename; ?></title>
  </head>
  <body onload="new Accordian('accordian',3,'header_highlight');">
    <div id="header">
      <h1><span style="text-decoration: underline;">WikkedPastebin</span><br>
      </h1>
      <h2>A free open source pastebin that is cooler than the rest<br>
      </h2>
    </div>
    <div id="accordian"><!--Parent of the Accordion-->
      <!--Start of each accordion item-->
      <div id="test-header" class="accordion_headings header_highlight">View This Paste</div>
      <!--Heading of the accordion ( clicked to show n hide ) -->
      <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
      <div id="test-content"><!--DIV which show/hide on click of header-->
        <!--This DIV is for inline styling like padding...-->
        <div class="accordion_child">
        <p>This Paste's Name is: <?php print($array['Title']); ?></p>
          <br>
          <p>This Paste's ID Is: <?php print($array['ID']); ?></p>
          <br>
          <p>This Paste's Language is: <?php print ($language); ?></p>
          <br>
          <p>This Paste's Contents:</p>
          <br>
          <p>Who pasted this paste: <?php print($array['MemberName']); ?></p>
          <?php
          echo $geshi->parse_code();
                            ?>
        </div>
      </div>
      <!--End of each accordion item-->
      <!--Start of each accordion item-->
      <div id="test1-header" class="accordion_headings">Stats</div>
      <!--Heading of the accordion ( clicked to show n hide ) -->
      <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
      <div id="test1-content"><!--DIV which show/hisde on click of header-->
        <!--This DIV is for inline styling like padding...-->
        <div class="accordion_child">
          <?php
          database_connect();
          mysql_query('SELECT * FROM (');
          mysql_query('SELECT * FROM comments ORDER BY time DESC');
          mysql_query(') AS foo GROUP BY post_id ORDER BY time DESC LIMIT 20');
?>
          <ul>
          </ul>
          <h2>Note from the Wikked Pastebin Staff<br>
          </h2>
          <blockquote>Simplicity, Quality, and User Friendlyness comes
            before features. That's how you show yourself as a good
            person ;)</blockquote>
        </div>
      </div>
      <!--End of each accordion item-->
      <!--Start of each accordion item-->
      <div id="test2-header" class="accordion_headings">&nbsp;Copyright
        Information<br>
      </div>
      <!--Heading of the accordion ( clicked to show n hide ) -->
      <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
      <div id="test2-content"><!--DIV which show/hide on click of header-->
        <!--This DIV is for inline styling like padding...-->
        <div class="accordion_child">This Pastebin uses <a
            href="http://wikkedpaste.com">Wikked Pastebin</a>
          Software. Please don't remove these notices, as we want to be
          credited as well. We thank you very much for cooperating with
          us.<br>
        </div>
      </div>
      <!--End of each accordion item-->
      <!--Start of each accordion item-->
      <div id="test3-header" class="accordion_headings">Links</div>
      <!--Heading of the accordion ( clicked to show n hide ) -->
      <!--Prefix of heading (the DIV above this) and content (the DIV below this) to be same... eg. foo-header & foo-content-->
      <div id="test3-content"><!--DIV which show/hide on click of header-->
        <!--This DIV is for inline styling like padding...-->
        <div class="accordion_child">
          <p>Some links for your viewing pleasure:</p>
          <ul class="links">
            <li><a href="http://wikkedpastebin.com"><span
                  style="text-decoration: underline;">Wikked Pastebin</span></a></li>
          </ul>
        </div>
      </div>
      <!--End of each accordion item--> </div>
    <!--End of accordion parent-->
    <div id="footer">
      <p class="validate"><a
          href="http://validator.w3.org/check?uri=referer">XHTML</a> | <a
          href="http://jigsaw.w3.org/css-validator/">CSS</a><br>
        <a href="#content">Top</a></p>
      <!-- Please leave this line intact -->
      <p><br>
        <!-- you can delete below here --><span style="font-weight:
          bold; color: rgb(255, 102, 0);"> © 2011 Wikked Pastebin</span><br>
      </p>
    </div>
  </body>
</html>
